package com.demo.generator.config;

import freemarker.template.Configuration;
import org.springframework.context.annotation.Bean;

/**
 * @program: demo
 * @description:
 * @author: fbl
 * @create: 2021-12-23 14:19
 **/
@org.springframework.context.annotation.Configuration
public class WordConfig {

    @Bean
    public Configuration wordConfiguration(){
        Configuration result = new Configuration();
        result.setDefaultEncoding("utf-8");
        //设置模板加载器
        result.setClassForTemplateLoading(this.getClass(), "/word");
        return result;
    }

}
